﻿<ResourceDictionary
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:local="clr-namespace:Charts"
	
>
<!--TODO:Перенести в ось категорий, отдельной таблицы не должно быть-->
	<ResourceDictionary.MergedDictionaries>
		<ResourceDictionary Source="..\Theme.xaml"/>
	</ResourceDictionary.MergedDictionaries>
	
	<Style x:Key="TableStyle" TargetType="ItemsControl">
		
		<Setter Property="ItemsSource" Value="{Binding}"/>
		
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="ItemsControl">
					<ItemsPresenter/>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
		
		<Setter Property="ItemsControl.ItemsPanel">
			<Setter.Value>
				<ItemsPanelTemplate>
					<UniformGrid IsItemsHost="True" Columns="{Binding Path=Count}"/>
				</ItemsPanelTemplate>
			</Setter.Value>
		</Setter>
		
		<Setter Property="ItemsControl.ItemContainerStyle">
			<Setter.Value>
				<Style TargetType="ContentPresenter">
					<Setter Property="HorizontalAlignment" Value="Center"/>
				</Style>
			</Setter.Value>
		</Setter>
		
		<Setter Property="ItemTemplateSelector">
			<Setter.Value>
				<local:ValuesDataTemplateSelector Path="{StaticResource valuePath}" StringFormat="{StaticResource stringFormat}"/>
			</Setter.Value>
		</Setter>
	
	</Style>

</ResourceDictionary>